
Imports System.Data
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
#Region "using"
#End Region
Public Class LOAINGUOIDUNG_CHUCNANGBUS
    Private objDAO As LOAINGUOIDUNG_CHUCNANGDAO
    Public Sub New(ByVal strPath As [String])
        objDAO = New LOAINGUOIDUNG_CHUCNANGDAO(strPath)
    End Sub

    Public Function SelectAll() As DataSet
        Dim ds As DataSet
        Try
            ds = objDAO.SelectAll()
            Return ds
        Catch e As System.Exception
            Throw New Exception(e.Message, e.InnerException)
        End Try
    End Function

    Public Function SelectByID(ByVal id As Integer) As DataSet
        Dim ds As DataSet
        Try
            ds = objDAO.SelectByID(id)
            Return ds
        Catch e As System.Exception
            Throw New Exception(e.Message, e.InnerException)
        End Try
    End Function

    Public Function Insert(ByVal obj As LOAINGUOIDUNG_CHUCNANGDTO) As Boolean
        Try
            Return objDAO.Insert(obj)
        Catch
            Return False
        End Try
    End Function

    Public Function Delete(ByVal id As Integer) As Boolean
        Try
            Return objDAO.Delete(id)
        Catch
            Return False
        End Try
    End Function

    Public Function Update(ByVal obj As LOAINGUOIDUNG_CHUCNANGDTO) As Boolean
        Try
            Return objDAO.Update(obj)
        Catch
            Return False
        End Try
    End Function

    Public Function SelectByIDChucNang(ByVal idchucnang As Integer) As DataSet
        Dim ds As DataSet
        Try
            ds = objDAO.SelectByIDChucNang(idchucnang)
            Return ds
        Catch e As System.Exception
            Throw New Exception(e.Message, e.InnerException)
        End Try
    End Function

    Public Function SelectByIDLoaiNguoiDung(ByVal idloainguoidung As Integer) As DataSet
        Dim ds As DataSet
        Try
            ds = objDAO.SelectByIDLoaiNguoiDung(idloainguoidung)
            Return ds
        Catch e As System.Exception
            Throw New Exception(e.Message, e.InnerException)
        End Try
    End Function

End Class
